using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DataTransferObject;
namespace DataAccessObject
{
    public class Common
    {
        public bool FieldExists(IDataReader reader, string FieldName)
        {
            reader.GetSchemaTable().DefaultView.RowFilter = String.Format("ColumnName='{0}'", FieldName);
            return reader.GetSchemaTable().DefaultView.Count > 0;
        }
        public bool IsCauHoiCha(int k)
        {
            int[] LoaiCauHoiCha = new int[3] { 2, 3, 4 };
            for (int i = 0; i < LoaiCauHoiCha.Length; i++)
                if (k == LoaiCauHoiCha[i])
                    return true;
            return false;
        }

    }
}
